//
// Created by YE on 2024/2/13.
//

#ifndef MATINTERPRETER_YCH_OBJECT_H
#define MATINTERPRETER_YCH_OBJECT_H

#include "ych.h"

typedef YCH_INT Int;
typedef YCH_FLOAT Float;
typedef YCH_STRING String;
typedef YCH_MAT Mat;
typedef YCH_UINT Uint;
typedef YCH_BOOL Bool;
typedef union YOValue {
    void *p;
    Int i;
    Float f;
    Bool b;
} OValue;
typedef enum YOt {
    Ot_None,
    Ot_Int,
    Ot_Float,
    Ot_Bool,
    Ot_Mat_V,
    Ot_Mat,
    Ot_String,
    Ot_List,
    Ot_P,       //内置指针类型
    Ot_T,       //未定类型
} Ot;
typedef struct YObject {
    Ot type;//数据类型
    OValue value;//数据
} Object;
#endif //MATINTERPRETER_YCH_OBJECT_H
